From 95ef08f67723e2ed17d65c6def297c3e30f68b7d Mon Sep 17 00:00:00 2001 From: Marco Eichelberg Date: Fri, 30 Jan 2026 18:21:33 +0100 Subject: [PATCH] [PATCH] Added support for GNU Hurd in OFgetExecutablePath(). Thanks to Pino Toscano (GitHub user pinotree) for the pull request. This closes GitHub PR #137. Gbp-Pq: Name hurd.patch --- ofstd/libsrc/ofwhere.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ofstd/libsrc/ofwhere.c b/ofstd/libsrc/ofwhere.c index 3b6bec18..3e8b3e59 100644 --- a/ofstd/libsrc/ofwhere.c +++ b/ofstd/libsrc/ofwhere.c @@ -165,7 +165,7 @@ int OFgetExecutablePath(char* out, int capacity, int* dirname_length) return OFgetModulePath_(NULL, out, capacity, dirname_length); } -#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(WAI_USE_PROC_SELF_EXE) +#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(__GNU__) || defined(WAI_USE_PROC_SELF_EXE) #include #include @@ -185,6 +185,10 @@ int OFgetExecutablePath(char* out, int capacity, int* dirname_length) #endif #endif +#if !defined(PATH_MAX) +#define PATH_MAX 1024 +#endif + int OFgetExecutablePath(char* out, int capacity, int* dirname_length) { -- 2.30.2